<template>
    <el-form :label-position="'right'" :label-width="labelWidth || '1.3rem'" :model="formData">
        <el-form-item label="审核意见">
            <el-select v-model="formData.state" placeholder="请选择">
                <el-option
                    v-for="item in options"
                    :key="item.value"
                    :label="item.label"
                    :value="item.value">
                </el-option>
            </el-select>
        </el-form-item>
        <el-form-item label="原因说明">
            <el-input type="textarea" v-model="formData.remark" :autosize="{ minRows: 4, maxRows: 4}"></el-input>
        </el-form-item>
        <!--<el-form-item>-->
            <!--<upload :fileList.sync="fileList"></upload>-->
        <!--</el-form-item>-->
        <div class="btn">
            <el-button type="primary" size="large" @click="save">确认</el-button>
        </div>
    </el-form>
</template>

<script>
    import upload from './upload'

    export default {
        name: '',
        props: ['labelWidth'],
        data() {
            return {
                formData: {
                    remark: '',
                    state: 2
                },
                options: [{
                    value: 2,
                    label: '审核通过'
                }, {
                    value: 3,
                    label: '审核不通过'
                }],
                fileList: []
            }
        },
        mounted() {

        },
        methods: {
            save() {
                let _this = this
                this.$emit('save', this.formData, this.fileList, () => {
                    _this.fileList = []
                    _this.formData = {
                        remark: '',
                        state: 2
                    }
                })
            }
        },
        components: {
            upload
        }
    }
</script>

<style scoped lang="less">
    .btn {
        margin-top: .6rem;
        text-align: center;
        .el-button {
            padding-left: .5rem;
            padding-right: .5rem;
        }
    }
</style>
